package com.maimang.platform.dsp.job;

import com.maimang.platform.common.service.SysApiLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * @classname ApiLogTask
 * @description <br>api请求日志清理</br>
 * @author  Rocky
 * @date    2019-09-16 11:13
 * @email   jintaozhao@qq.com
 * @version 1.0.0
 */
@Component("apiLogTask")
public class ApiLogTask {

	@Autowired
	private SysApiLogService apiLogService;


	public void clearLogs(String days) {
		int daysInt = Integer.parseInt(days);
		apiLogService.deleteHistoryLogs(daysInt);
	}

}
